package com.raulraja.util.deployment.impl;


import com.raulraja.util.deployment.ServletContextProvider;
import org.springframework.web.context.ServletContextAware;

import javax.servlet.ServletContext;

/**
 * Spring based impl of the ServletContextProvider
 */
public class SpringInjectedServletContextProviderImpl implements ServletContextProvider, ServletContextAware {

	/**
	 * the servlet context
	 */
    private ServletContext servletContext;

	/**
	 * @return the servlet context
	 */
    public ServletContext getServletContext() {
        return servletContext;
    }

	/**
	 * sets the servlet context, invoked by the container at startup since this service implements ServletContextAware
	 * @param servletContext the servlet context
	 */
    public void setServletContext(ServletContext servletContext) {
        this.servletContext = servletContext;
    }
}
